<script setup lang="ts">
import router from "@/Router";
import {findUserById} from "@/Network/userApi";
import {ref} from "vue";
import type {typeUser} from "@/store/dataType";

let currentUserId = localStorage.getItem("userId")
let userImg = ref()
let user:typeUser = ref({})
findUserById(currentUserId).then(res=>{
  user.value = res.data
  // userImg.value = res.data.userImg
})

const sendUserTab = () => {
  router.push("/user")
}
</script>

<template>
  <div class="user-photo  rounded-full flex justify-center items-center gap-5"
    @click="sendUserTab"
  >
    <img :src="user.userImg" class="w-8  rounded-full border-yellow border-2">
    <div>{{user.name}}</div>
  </div>

</template>

<style scoped>
div::-webkit-scrollbar {
  display: none;
}
</style>